<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>打印</title>
    <!-- <link rel="stylesheet" href="./css/print.css"> -->
    <style>
        html,
        body,
        ul,
        li,
        span {
            padding: 0;
            margin: 0;
            list-style: none;
        }

        .print-ul {
            width: 450px;
            border-top: 1px solid #000;
            margin: 0 auto;
        }

        .print-ul-li {
            display: flex;
            width: 100%;
            line-height: 35px;
            border-bottom: 1px solid #000;
            border-left: 1px solid #000;
            border-right: 1px solid #000;
        }

        .print-ul-li-span {
            flex: 1;
            border-left: 1px solid #000;
            padding: 0 5px;
        }

        .print-ul-li-span-no-border-left {
            border-left: 0 none;
        }
    </style>
</head>

<body>

</body>
<script>

    var html = `
    <div>
        <ul class="print-ul">
            <li class="print-ul-li">
                <span class="print-ul-li-span print-ul-li-span-no-border-left">收货单位</span>
                <span class="print-ul-li-span">华达恒泰汽修</span>
            </li>
            <li class="print-ul-li">
                <span class="print-ul-li-span print-ul-li-span-no-border-left">货物件数</span>
                <span class="print-ul-li-span">1/1</span>
                <span class="print-ul-li-span">福顺快印</span>
            </li>
            <li class="print-ul-li">
                <span class="print-ul-li-span print-ul-li-span-no-border-left">代收货款</span>
                <span class="print-ul-li-span">375.00</span>
            </li>
            <li class="print-ul-li">
                <span class="print-ul-li-span print-ul-li-span-no-border-left">客户电话</span>
                <span class="print-ul-li-span">13306403111</span>
            </li>
            <li class="print-ul-li"><span class="print-ul-li-span print-ul-li-span-no-border-left">尼桑部门 0531-8597 8866</span></li>
            <li class="print-ul-li"><span class="print-ul-li-span print-ul-li-span-no-border-left">斯巴鲁部门 0531-8580 2288</span></li>
            <li class="print-ul-li"><span class="print-ul-li-span print-ul-li-span-no-border-left">任何货运‘不允许减款’</span></li>
        </ul>
    </div>
    `
    window.document.body.innerHTML = html;
    // console.log(window.document.body.innerHTML)
    window.print()

</script>

</html>